repo.or.cz
/
andmenj-acm.git
/
blob
commit
grep
author
committer
pickaxe
?
search:
re
summary
|
log
|
graphiclog1
|
graphiclog2
|
commit
|
commitdiff
|
tree
|
refs
|
edit
|
fork
blame
|
history
|
raw
|
HEAD
Namespacing everything to /UVa.
[andmenj-acm.git]
/
UVa
/
11296 - Counting Solutions of an Integer Equation
/
#p11296.cpp#
blob
d8d2d2d6b85f9955fccac7c5b488bca8687809b4
1
#include <iostream>
2
3
4
int main(){
5
int n;
6
while (cin >> n){
7
long long s=0;
8
if (n % 2 == 1) --n;
9
while (n >= 0){
10
s += (n/2)+1;
11
n -= 2;
12
}
13
cout << s << endl;
14
}
15
16
return 0;
17
}